package com.android.canvasproject.model.entity;

public class Comment extends GenericEntity {

	private static final long serialVersionUID = 4637074451965821796L;

	private Integer id;
	
	private String description;
	
	private Integer postit;
	
	private Integer sponsor;
	
	public static class CommentDao {
		
		public static final String TB_COMMENT = "COMMENT";
		
		public static final String[] COLS_COMMENT = new String[] { "_id",
			"description", "id_postit", "id_person_sponsor", "id_ics",
			"creation_date", "last_sync", "last_notification",
			"local_creation", "is_synchronized" };
		
		public static final String DB_CREATE_COMMENT = "CREATE TABLE IF NOT EXISTS COMMENT (_id INTEGER PRIMARY KEY, description TEXT NOT NULL, id_postit INTEGER NOT NULL, id_person_sponsor INTEGER NOT NULL, id_ics BIGINT UNIQUE, creation_date DATETIME DEFAULT CURRENT_TIMESTAMP, last_sync TIMESTAMP NULL, last_notification TIMESTAMP NULL, local_creation INT DEFAULT 0, is_synchronized INT DEFAULT 0, CONSTRAINT fk_comment_person FOREIGN KEY (id_person_sponsor) REFERENCES PERSON (_id), CONSTRAINT fk_comment_postit FOREIGN KEY (id_postit) REFERENCES POSTIT (_id));";
		
	}
	
	public Comment() {
		super();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getPostit() {
		return postit;
	}

	public void setPostit(Integer postit) {
		this.postit = postit;
	}

	public Integer getSponsor() {
		return sponsor;
	}

	public void setSponsor(Integer sponsor) {
		this.sponsor = sponsor;
	}
}